#!/bin/bash
# MySQL5.7卸载脚本
sudo systemctl stop mysqld

sudo yum remove mysql-community*

rm -rf /var/lib/mysql

rm -rf /etc/my.cnf

rm -rf /etc/mysql/my.cnf

rm -rf /var/log/mysqld.log

sudo yum clean all

sudo userdel mysql